<style lang="scss">
.muysd {
  width: 100%;
  height: 1110px;
  background-color: #f7f7f7;
}

.top {
  width: 100%;
  margin-top: 15px;
  height: 116px;
  background-color: white;

  div {
    text-align: center;

    p:nth-child(1) {
      font-size: 38px;
    }

    p:nth-child(2) {
      font-size: 16px;
    }
  }
}



.middle {
  width: 100%;
  height: 120px;
  background-color: white;

  div {
    width: 90%;
    margin-left: 15px;
    background-color: #f7f7f7;

    p:nth-child(1) {
      font-size: 16px;
      margin-top: 10px;
      margin-left: 10px;
    }

    p:nth-child(2) {
      font-size: 14px;
      margin-left: 10px;
      margin-top: 5px;
    }

    p:nth-child(3) {
      font-size: 14px;
      margin-left: 10px;
      margin-top: 5px;
      margin-bottom: 5px;
    }
  }
}

.souc {
  width: 100%;
  height: 436px;
  margin-top: 15px;
  background-color: white;

  .souc-top {
    width: 100%;
    height: 35px;

    span:nth-child(2) {
      margin-left: 220px;
    }
  }

  .souc-first {
    width: 100%;
    height: 225px;
  }

  .mkisu {
    width: 90%;
    margin-left: 10px;
    line-height: 22px;
    background-color: #f7f7f7;

    p {
      font-size: 16px;
      margin-left: 18px;
    }
  }
}

.kuy {
  margin-top: 40px;
  width: 100%;
  height: 242px;
  background-color: white;

  h4 {
    line-height: 40px;
    margin-left: 10px;
  }

  .mkke {
    width: 100%;
    height: 100px;

    .left {
      width: 100px;
      height: 100px;
      float: left;

      img {
        width: 100%;
        height: 100%;
      }
    }

    .right {
      float: left;
      margin-left: 10px;
      width: 70%;
      height: 100%;

      div {}
    }
  }
}

.button {
  height: 74px;
  background-color: white;
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 60px;

  button {
    border: none;
    width: 90%;
    text-align: center;
    margin-left: 20px;
    height: 40px;
    background-color: #39d167;
    color: white;
  }
}
</style>

<template> <!-- vue实例外创建 -->
  <div class='muysd'>

    <div class="top">

      <div>
        <p>--</p>
        <p>血糖(mmoVL)</p>
      </div>

    </div>

    <div class="middle">
      <div>
        <p>还没您的血糖记录</p>
        <p>通过智能设备上传或手动录入您的血糖数据,看看健康顾问</p>
        <p>怎么说</p>
      </div>
    </div>

    <div class="souc">
      <div class="souc-top">
        <span>
          近7次记录
        </span>

        <span>
          查看更多记录 >
        </span>

      </div>

      <div class="souc-first">
        <div ref="main" style="width: 400px;height:240px;"></div>
      </div>

      <div class="mkisu">
        <p>中国2型糖尿病防治指出:成人患者每周至少150分钟(每周5天,每天30分钟)中等强化度有氧运动。规律运动
          8周以上可以降低糖化血红蛋白。中等强度的锻炼包括静步走、太极拳、汽车、乒乓球、羽毛球等。
          如无禁忌证,每周最好配合2次抗阻运动(间隔≥48小时),如哑铃提举、深蹲起等。老年糖尿病患者应选择
          和缓的运动,当感受到运动费力、心跳和呼吸加快时，应注意休息，避免心跳呼吸急促。
        </p>
      </div>
    </div>


    <div class="kuy">
      <h4>智能设备</h4>
      <div class="mkke">
        <div class="left">
          <img src="../../assets/Snipaste_2024-12-27_16-49-27.png" alt="">
        </div>
        <div class="right">
          <div>三诺亲智血糖仪</div>
          <p>6</p>
        </div>
      </div>
      <div class="mkke">
        <div class="left">
          <img src="../../assets/Snipaste_2024-12-27_16-49-27.png" alt="">
        </div>

        <div class="right">
          <div>乐心智能血糖仪 G2</div>
          <p>11</p>
        </div>
      </div>
    </div>

    <div class="button">
      <button>手动录入</button>
    </div>

  </div>
</template>
<!-- 调用   <mycom></mycom> -->
<script lang="ts" setup>


import * as echarts from 'echarts';
import { flat } from 'vant/lib/utils';
import { ref, onMounted } from 'vue'

const main = ref<HTMLElement>()

onMounted(() => {
  // 基于准备好的dom，初始化echarts实例
  var myChart = echarts.init(main.value as HTMLElement);
  // 绘制图表
  myChart.setOption({
    xAxis: {
      type: 'category',
      data: []
    },
    yAxis: {
      type: 'value',
    },
    series: [
      {
        data: [5.5, 2.4, 1.4, 5],
        type: 'line',
        lable: {
          formatter: function (params: any) {
            return (params.value) + 'mmol/L';
          }
        }
      },
    ]
  });
})
</script>